<p style="margin-bottom: 16px;">
    <a href="<?= $this->url(array('controller'=>'tasks', 'action'=>'create')) ?>">Добавяне на нова задача</a>
</p>

<? if ($this->tasks): ?>
    <table class="list">
        <tr>
            <th>Задача</th>
            <th>Действия</th>
        </tr>
        <? foreach($this->tasks as $item): ?>
        <tr>
            <td>
                <a href="<?= $this->url(array('controller'=>'tasks', 'action' => 'view', 'id' => $item['id']), null, true) ?>">
                    <?= $this->escape($item['name']) ?>
                </a>
            </td>
            <td>
                <a href="<?= $this->url(array('controller'=>'tasks', 'action'=>'view', 'id'=>$item['id']), null, true) ?>">Преглед</a> |
                <a href="<?= $this->url(array('controller'=>'tasks', 'action'=>'edit', 'id'=>$item['id']), null, true) ?>">Редактиране</a> |
                <a href="#">Изтриване</a>
            </td>
        </tr>
        <? endforeach ?>
    </table>
<? else: ?>
    Не са намерени задачи
<? endif ?>


